<?php
namespace Base\Controller;
use Todo\Controller\CurdController;

class StudentController extends CurdController {
    /**
     * 获取要编辑的数据，建议重写
     * @param $id
     * @return mixed
     */
    protected function _editData($id){
        $this->_loadModel();
        $data = $this->_model->keyFind($id);
        if($data['class_id']){
            $data['depart_id'] = D('Todo/Base/Class')->keyFind($data['class_id'], 'depart_id');
        }
        return $data;
    }

}